package com.wxj.edu.controller;

import com.wxj.commonutils.result.R;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/edu/user")
//@CrossOrigin    //解决跨域问题
public class LoginController {

    //login
    @PostMapping("login")
    public R login() {

        return R.success().data("token","admin");
    }


    //info
    @GetMapping("info")
    public R info() {

        return R.success().data("roles","[admin]").data("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
    }

}
